<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let a = 2;
    function f() {
        // Uncaught ReferenceError: Cannot access 'a' before initialization
        console.log(a);
        // let a = 1;
    }

    f();
</script>
</body>
</html>